|
|
|
|
|
|
|
What you have created is a fairly simple report. However, you still need to add code to the application in order to use or display it. To preview the report in your application requires that you add only a single line of code. Add a new Command button to the default form and then add the following line of code to its Click event routine: |
|
|
|
|
|
|
|
|
When you run the application and click the Command button, the Data Report is displayed(see Figure 12.15) with the data being accessed from the database at that time. |
|
|
|
|
|
|
|
|
Figure 12.15.
Previewing the report in the application. |
|
|
|
|
|
|
|
|
Note If you are not using a header or footer, you can remove them from the report by simply collapsing it or reducing its height to zero. |
|
|
|
|
|
|
|
|
|
After you have a simple data report, it is possible to extend it and make a more complex report by adding additional Child commands to the Data Environment and then inserting Group Headers and Footers for the new data as needed. Figure 12.16 shows the same report with the addition of a lower Child command to display the order detail within each order for each customer. |
|
|
|
|
|